<template>
    <div class="detail-infos">
        <div class="name">{{ infosDate?.houseName }}</div>
        <div class="tags">
            <template v-for="(item,index) in infosDate.houseTags">
                <span class="tag" v-if="item.tagText"
                      :style="{color:item.tagText.color,background:item.tagText.background.color}">
                      {{ item.tagText.text }}
                </span>
            </template>
        </div>
        <div class="commentBrief">
            <div class="left">
                <span class="score">{{ infosDate.commentBrief.overall }}</span>
                <span class="title">{{ infosDate.commentBrief.scoreTitle }}</span>
                <span class="brief">{{ infosDate.commentBrief.commentBrief }}</span>
            </div>
            <div class="right">
                <span class="comment">{{ infosDate.commentBrief.totalCount }}条评论</span>
                <van-icon name="arrow" />
            </div>
        </div>
        <div class="position">
            <div class="left">{{ infosDate.nearByPosition.address }}</div>
            <div class="right">
                <span>地图·周边</span>
                <van-icon name="arrow" />
            </div>
        </div>
    </div>
</template>

<script setup>
    defineProps({
        infosDate:{
            type:Object,
            default:() => ({})
        }
    })
</script>


<style lang='less' scoped>
.detail-infos {
    padding: 10px;
    .name {
        font-size: 20px;
        font-weight: 600;
    }
    .tags {
       margin: 4px 0;
        .tag {
            font-size: 13px;
            padding: 0 2px;
            margin-right: 3px;
        }
    }
    .commentBrief {
        margin: 10px 0;
        padding: 10px;
        background-color: #f7f9fb;
        border-radius: 8px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        .left {
            .score {
                font-size: 18px;
                color: #333;
                font-weight: 600;
            }
            .title {
                font-size: 13px;
                color: #333;
                margin: 0 4px;
                font-weight: 600;
            }
            .brief {
                font-size: 13px;
                color: #888;
            }
        }
        .right {
            color: var(--primary-color);
            font-size: 14px;
        }
    }
    .position {
        padding: 10px;
        background-color: #f7f9fb;
        border-radius: 8px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        .left {
            font-size: 16px;
        }
        .right {
            font-size: 14px;
            color: var(--primary-color);
        }
    }
}
</style>